﻿using Comm100.Framework.Module;
using Comm100.Framework.Extension;
using System.Reflection;
using Comm100.Public;
using Bot.Domain.DialogFlow;
using Bot.Domain.DialogFlow.Convertor;
using Bot.Domain.Comm100OwnBot;

namespace Bot.Domain
{
    [DependsOn(typeof(PublicDomainModule))]
    public class BotDomainModule : BaseDomainModule
    {
        public override void PreInitialize()
        {
            this.Container.RegisterIfNot<IBotApiService, BotApiService>(DependencyLifeStyle.Transient);
            this.Container.RegisterIfNot<IComm100BotApiService, Comm100BotApiService>(DependencyLifeStyle.Transient);
            this.Container.RegisterIfNot<IComm100OwnBotApiService, Comm100OwnBotApiService>(DependencyLifeStyle.Transient);
            this.Container.RegisterIfNot<IComm100OwnBotService, Comm100OwnBotService>(DependencyLifeStyle.Transient);

            this.Container.RegisterIfNot<IDialogFlowService, DialogFlowService>(DependencyLifeStyle.Transient);
            this.Container.RegisterIfNot<IIntentConvertor, IntentConvertor>(DependencyLifeStyle.Transient);
            this.Container.RegisterIfNot<IEntityConvertor, EntityConvertor>(DependencyLifeStyle.Transient);
            
        }
    }
}
